#ifndef DATA
#define DATA

#include <QString>

namespace DataBase
{
   // 建立数据库语句
   const QString strLocalVehDBName    = QString::fromLocal8Bit("vehRecord.db");
   const QString strLocalVehDBConnect = QString::fromLocal8Bit("vehrecord_db_connection");
   namespace VehTbl
   {
       // 月卡车辆表
       const QString strVehVipTbl     = "CREATE TABLE IF NOT EXISTS veh_vip_tbl("
             "operator_name        VARCHAR NOT NULL,"       // 月卡办理操作人员
             "veh_plate            VARCHAR NOT NULL,"       // 车牌号
             "veh_ownner           VARCHAR DEFAULT NULL,"   // 车主姓名
             "veh_ownner_tel       VARCHAR DEFAULT NULL,"   // 车主电话
             "veh_valid_start_time VARCHAR,"                // 有效起始时间
             "veh_valid_end_time   VARCHAR,"                // 有效截止时间
             "veh_operate_time     VARCHAR,"                // 月卡办理时间
             "veh_vip_charge_money FLOAT,"                  // 缴费金额
             "PRIMARY KEY(veh_plate, veh_ownner)"
             ")";
       // 期卡（内部）车辆表
       const QString strVehInnerTbl     = "CREATE TABLE IF NOT EXISTS veh_inner_tbl("
             "operator_name        VARCHAR NOT NULL,"       // 添加内部车辆操作人员
             "veh_plate            VARCHAR NOT NULL,"       // 车牌号
             "veh_ownner           VARCHAR DEFAULT NULL,"   // 车主姓名
             "veh_ownner_tel       VARCHAR DEFAULT NULL,"   // 车主电话
             "veh_valid_start_time VARCHAR,"                // 内部车辆启用时间
             "veh_valid_end_time   VARCHAR,"                // 内部车辆截止时间
             "veh_operate_time     VARCHAR,"                // 内部车辆添加时间
             "PRIMARY KEY(veh_plate, veh_ownner)"
             ")";
   }
}

#endif // DATA

